import React, { useState, useEffect } from 'react';
import 'antd/dist/antd.css'
import '../css/index.scss'
import { Table, Button, Select, Space, Modal, Form, Switch, Input, message, InputNumber } from 'antd';
import axios from '../../../../../http/index'


export default function Add(props) {
    console.log(props.seedatas);
    const [seedatas, setseedatas] = useState({
        couponName: props.seedatas.name,
        couponName2: props.seedatas.position,
        selects: props.seedatas.timer,
        couponName3: props.seedatas.state,
        couponName4: props.seedatas.frequency,
        couponName5: props.seedatas.order,
    })
    const layout = {
        labelCol: { span: 5 },
        wrapperCol: { span: 19 },
    };
    const onFinish = (values) => {
        console.log(values);
    };
    return (
        <div>
            <Form {...layout} name="nest-messages"
                onFinish={onFinish}
                initialValues={{
                    ...seedatas
                }}
            >
                <Form.Item name='couponName' label="广告名称" >
                    <Input readOnly={true} />
                </Form.Item>
                <Form.Item name='couponName2' label="广告位置" >
                    <Input readOnly={true} />
                </Form.Item>
                <Form.Item label="时间" name='selects' >
                    <Input readOnly={true} />
                </Form.Item>
                <Form.Item name='couponName3' label="当前状态" >
                    <Input readOnly={true} />
                </Form.Item>
                <Form.Item name='couponName4' label="点击次数" >
                    <Input readOnly={true} />
                </Form.Item>
                <Form.Item name='couponName5' label="生成订单" >
                    <Input readOnly={true} />
                </Form.Item>
            </Form>

        </div>
    )
}
